1. Field of the Invention
The present invention relates to a retrievable memory having a variable data structure to be retrieved, and more particularly concerns a retrievable memory which eliminates the need for addresses of data to be retrieved.
2. Description of the Background Art
FIG. 8 shows a conventional data retrieve system using a CAM (Content Addressable Memory). The conventional data retrieval system has a CAM 500 and a memory 540. The CAM 500 is constituted by a memory 510 and an address encoder 520. The memory 510 stores a plurality of key data. The memory 540 stores a plurality of content data corresponding to the key data in the memory 510. Upon receipt of a signal representative of key data matched with a retrieval key 530 from a memory 510, the address encoder 520 specifies an address in the memory 540 storing the data corresponding to the matched key data.
In the conventional data retrieval system, when a retrieval key 530 is inputted to a memory 510 of the CAM 500, the memory 510 extracts key data that is matched with the retrieval key 530. Then, the memory 510 outputs an activation signal for activating the extracted key data to the address encoder 520.
Then, based upon the inputted activation signal, the address encoder 520 generates an address of the content data corresponding to the key data matched with the retrieval key, and outputs the address thus generated to the memory 540. The memory 540 outputs the content data stored in the site specified by the inputted address.
In this manner, in the conventional data retrieval system, the key data that is matched with a retrieval key 530 is extracted, and the retrieved content data is read out through generating an address for specifying the content data corresponding to the extracted key data.
Thus, in the conventional data retrieval system, a mono-directional data retrieve is carried out, that is, the content data is read out based upon the key data.
However, in the conventional data retrieval system, when the retrieval key 530 is matched with a plurality of key data, a plurality of content data are outputted from the memory 540, resulting in a failure in obtaining a single content data.
In order to solve the above-mentioned problem, the objective of the present invention is to provide a retrievable memory which can output a single data even when a plurality of results of retrieve are obtained.
A retrievable memory in accordance with the present invention includes a first memory storing n number (n: natural number) of key data, and outputting a matching signal when inputted retrieval key information is matched with stored key data; a second memory storing n number of content data corresponding to n number of key data; and a priority encoder specifying, upon receipt of matching signal, content data stored in second memory corresponding to key data that is matched with retrieval key information, wherein priority encoder outputs a specifying signal that specifies single content data when a plurality of matching signals are inputted from first memory, and second memory outputs the content data specified by specifying signal.
In the retrievable memory of the present invention, when the retrieval key information is matched with key data stored in the first memory, the first memory outputs a matching signal to the priority encoder, and the priority encoder specifies content data stored in the second memory that corresponds to the key data matched with the retrieval key information. Moreover, upon receipt of a plurality of matching signals outputted from the first memory, the priority encoder specifies single content data. Then, the second memory outputs the content data specified by the priority encoder.
Therefore, in accordance with the present invention, single content data is outputted even when a plurality of results of retrieve are obtained.
Moreover, in accordance with the present invention, it is not necessary to generate an address for reading out content data corresponding to the key data matched with the retrieval key data, and it is possible to reduce the area of the retrievable memory.
More preferably, in a retrievable memory, the first memory stores n number of key data in an ordered manner, and the priority encoder outputs a specifying signal for specifying content data corresponding to the lowest order key data among m number (m: natural number not more than n) of key data matched with the retrieval key information when m number of matching signals are inputted from the first memory.
In the case when a plurality of matching signals are inputted from the first memory, the priority encoder specifies content data corresponding to the lowest order key data among a plurality of key data matched with the retrieval key data. Then, the second memory outputs the content data specified by the priority encoder.
Therefore, in accordance with the present invention, even when a plurality of results of retrieve are obtained, it is possible to output single content data.
More preferably, in a retrievable memory, the first memory outputs m number of first logical signals and nxe2x88x92m number of second logical signals when the retrieval key information matches with m number of key data, the priority encoder outputs in response to a first logical signal an activation signal for reading out content data corresponding to the lowest order key data to the second memory, and the second memory outputs content data corresponding to said lowest order key data based on said activation signal, the first logical signal is generated in accordance with the lowest order key data among said m number of first logical signals.
When the retrieval key data is matched with the key data, the first memory outputs the first logical signal, and when the data is not matched with the key data, it outputs the second logical signal. Then, the priority encoder outputs the activation signal used for reading the corresponding content data based upon the first logical signal. Moreover, upon receipt of a plurality of first logical signals from the first memory, the priority encoder outputs an activation signal used for reading content data corresponding to the lowest order key data among key data matched with the retrieval key data. Then, based upon the activation signal, the second memory outputs the content data corresponding to the key data. Therefore, in accordance with the present invention, even when a plurality of results of retrieval are obtained, single content data is outputted by the logical signal.
Moreover, the retrievable memory in accordance with the present invention includes a first memory storing n number (n: natural number) of key data, and outputting a first matching signal when inputted retrieval key information is matched with stored key data; a second memory storing n number of content data corresponding to n number of key data, and outputting a second matching signal when inputted content retrieval information is matched with stored content data; a priority encoder specifying, upon receipt of the first matching signal, the content data stored in the second memory corresponding to the key data matched with said retrieval key information, and specifying, upon receipt of the second matching signal, key data stored in the first memory corresponding to the content data matched with the content retrieval information, wherein the priority encoder outputs a first specifying signal for specifying single content data upon receipt of a plurality of first matching signals, and outputs a second specifying signal for specifying single key data upon receipt of a plurality of second matching signals, the second memory outputs the content data specified by the first specifying signal, and the first memory outputs the key data specified by the second specifying signal.
In the retrievable memory in accordance with the present invention, when retrieval key information is matched with key data stored in the first memory, the first memory outputs a first matching signal to the priority encoder, and the priority encoder specifies content data stored in the second memory that corresponds to the key data matched with the retrieval key information. Moreover, upon receipt of a plurality of first matching signals from the first memory, the priority encoder specifies single content data. Then, the second memory outputs the content data specified by the priority encoder. Here, in the retrievable memory, when the content retrieval information is matched with the content data stored in the second memory, the second memory outputs the second matching signal to the priority encoder, and the priority encoder specifies key data stored in the first memory corresponding to the content data matched with the content retrieval information. Moreover, upon receipt of a plurality of second matching signals from the second memory, the priority encoder specifies single key data. Then, the first memory outputs the key data specified by the priority encoder. Therefore, in accordance with the present invention, a bidirectional retrieving process is available between the key data and the content data, and even when a plurality of results of retrieval are obtained, single content data or key data can be outputted.
More preferably, in a retrievable memory, the first memory stores n number of key data in an ordered manner, the second memory stores n number of content data in an ordered manner, and the priority encoder outputs a first specifying signal for specifying content data corresponding to the lowest order key data among m number (m: natural number not more than n) of key data matched with the retrieval key information when m number of the first matching signals are inputted from the first memory, and outputs a second specifying signal for specifying key data corresponding to the lowest order content data among k number (k: natural number not more than n) of content data matched with the content retrieval information when k number of the second matching signals are inputted from the second memory.
Upon receipt of a plurality of the first matching signals from the first memory, the priority encoder specifies content data corresponding to the lowest order key data among the plurality of key data matched with the retrieval key data. Then, the second memory outputs the content data specified by the priority encoder. Moreover, upon receipt of a plurality of the second matching signals from the second memory, the priority encoder specifies key data corresponding to the lowest order content data among the plurality of content data matched with the content retrieval data. Then the first memory outputs the key data specified by the priority encoder.
Therefore, in accordance with the present invention, in the bidirectional retrieval system between the key data and the content data, even when a plurality of results of retrieval are obtained, it is possible to output single content data.
More specifically, in a retrievable memory, the first memory outputs m number of first logical signals and nxe2x88x92m number of second logical signals when the retrieval key information is matched with m number of key data, the second memory outputs k number of third logical signals and nxe2x88x92k number of fourth logical signals when the content retrieval information is matched with k number of content data, the priority encoder outputs in response to the first logical signal a first activation signal for reading out the content data corresponding to the lowest order key data to the second memory, and outputs in response to the third logical signal a second activation signal for reading out the key data corresponding to the lowest order content data to the first memory, the first memory outputs the key data corresponding to the lowest order content data based on the second activation signal, and the second memory outputs the content data corresponding to the lowest order key data based on the first activation signal, the first logical signal is generated in accordance with the lowest order key data among the inputted m number of first logical signals, the third logical signal is generated in accordance with the lowest order key data among the inputted k number of third logical signals.
The first memory outputs the first logical signal when the retrieval key data is matched with the key data, and it outputs the second logical signal when not matched with the key data. Then, the priority encoder outputs, based upon the first logical signal, the first activation signal used for reading out the corresponding content data to the second memory. Moreover, upon receipt of a plurality of the first logical signals from the first memory, the priority encoder outputs the first activation signal used for reading out the content data corresponding to the lowest order key data among the key data matched with the retrieval key data to the second memory. Then, based upon the first activation signal, the second memory outputs the content data corresponding to the key data.
Moreover, the second memory outputs the third logical signal when the content retrieval data is matched with the content data, and it outputs the fourth logical signal when not matched with the content data. Then, the priority encoder outputs, based upon the third logical signal, the second activation signal used for reading out the corresponding key data to the first memory. Moreover, upon receipt of a plurality of the third logical signals from the second memory, the priority encoder outputs the second activation signal used for reading out key data corresponding to the lowest order content data among the content data matched with the content retrieval data to the first memory. Then, the first memory outputs the key data corresponding to the content data based upon the second activation signal.
Therefore, in accordance with the present invention, in the bidirectional retrieval system between the key data and the content data, it is possible to output single content data by using the logical signal even when a plurality of results of retrieve are obtained.
Moreover, the retrievable memory in accordance with the present invention includes a first memory storing a plurality of pairs of key data each consisting of first key data and second key data, and outputting a first or second matching signal when retrieval key information is matched with the first or second key data stored therein; a second memory storing a plurality of content data corresponding to the plurality of first and second key data; and a priority encoder specifying, upon receipt of the first or second matching signal, the content data stored in the second memory corresponding to the first or second key data, wherein the priority encoder outputs a first specifying signal for specifying the content data stored in the second memory corresponding to a pair of first and second key data among the plurality of first and second key data that are matched with the retrieval key information when the plurality of first and second matching signals are inputted and when a selection signal has a first logic, and outputs a second specifying signal for specifying the content data stored in the second memory corresponding to a first or second key data among first or second key data that are matched with the retrieval key information when the plurality of first and second matching signals are inputted and when the selection signal has a second logic, and the second memory outputs the content data specified by the first or second specifying signal.
In the retrievable memory in accordance with the present invention, the key data is constituted by a pair of key data consisting of first key data and second key data. When the key data is matched with the retrieval key data, the first memory outputs matching signals independently with respect to the first key data and the second key data; consequently, the priority encoder specifies content data corresponding to the first and second key data or content data corresponding to either the first or second key data. Then, the second memory outputs the content data specified by the priority encoder.
Therefore, in accordance with the present invention, in a retrieval system capable of retrieving while selectively changing the length of the retrieval key data, it is possible to output single content data even when a plurality of results of retrieve are obtained.
More preferably, in a retrievable memory, the first memory stores a pair of first and second key data in an ordered manner, and the priority encoder outputs, based on the plurality of first and second matching signals and the selection signal with first logic, a first specifying signal for specifying the content data stored in the second memory corresponding to the first and second key data in the lowest order among the plurality of first and second key data that matched with the retrieval key information, and outputs, based on the plurality of first and second matching signals and said selection signal with second logic, a second specifying signal for specifying the content data stored in the second memory corresponding to first and second key data in the lowest order among first and second key data that matched with the retrieval key information.
Upon receipt of a plurality of matching signals, the priority encoder specifies the content data corresponding to the lowest order key data among the key data matched with the retrieval key data, independent of the length of the retrieval key data. Then, the second memory outputs the content data specified by the priority encoder.
Therefore, in accordance with the present invention, in a retrieval system capable of retrieving while selectively changing the length of the retrieval key data, it is possible to output single content data even when a plurality of results of retrieve are obtained.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.